package org.duiduo.api.bean;

import lombok.Getter;
import lombok.Setter;
import org.duiduo.api.valid.ValidationGroups;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 用户 VO
 *
 * @author liangze
 * @date 2021/9/18 18:07
 */
@Getter
@Setter
public class UserVO extends BaseBeanVO {

    @NotNull(groups = {ValidationGroups.Update.class, ValidationGroups.Delete.class}, message = "用户ID不存在")
    private Integer id;

    @NotNull(groups = {ValidationGroups.Update.class, ValidationGroups.Insert.class}, message = "请输入用户名")
    private String username;

    @NotNull(groups = {ValidationGroups.Update.class, ValidationGroups.Insert.class}, message = "请输入昵称")
    private String nickname;

    @NotNull(groups = {ValidationGroups.Update.class, ValidationGroups.Insert.class}, message = "请输入年龄")
    private Integer age;

    @NotNull(groups = {ValidationGroups.Update.class, ValidationGroups.Insert.class}, message = "请选择性别")
    private String sex;

    private String address;

    @NotNull(groups = {ValidationGroups.Update.class, ValidationGroups.Insert.class}, message = "请选择角色")
    private Integer role;

    private BigDecimal account;

    private String avatar;

    private String password;

    private List<BookVO> bookList;
}
